Skip to main content

Add Point

Description#

Add point to student record.

Method#

POST

Endpoint#

/admin/api.php?f=addPoints

Header#

Content-Type: application/x-www-form-urlencoded

Body#

student_id={student id}&points={points}

Response#

Success#
{
result: "success" //String
}
Fail#
{
result: "fail" //String
}

Example#

Javascript#

POST Request#
const addPoint = async () => {
const response = await fetch('http://stockknowledge.org/admin/api.php?f=addPoint',{
method: 'POST',
body: 'student_id=4&points=10',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
});
return await response.json();
}